package com.syh.jn.scm.infrastructure.repository.model.finance;

import com.syh.core.ddd.infrastructure.repository.model.SuperBusinessModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 订单费用表项
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "T_FINANCE_ORDER_EXPENSES_BILL_ITEM")
@EqualsAndHashCode(callSuper = true)
public class OrderExpensesBillItemModel extends SuperBusinessModel {
  /**
   * 订单费用表id
   */
  @Column(name = "EXPENSES_BILL_ID", columnDefinition = "bigint COMMENT '订单费用表id'")
  private Long expensesBillId;
  /**
   * 原始单类型(1：销售单、2：采购单)
   */
  @Column(name = "ORDER_TYPE", columnDefinition = "smallint COMMENT '原始单类型(1：销售单、2：采购单)'")
  private Short orderType;
  /**
   * 费用
   */
  @Column(name = "EXPENSES", columnDefinition = "decimal(19,6) COMMENT '费用'")
  private BigDecimal expenses;
  /**
   * 费用备注
   */
  @Column(name = "REMARK", columnDefinition = "varchar(300) COMMENT '费用备注'")
  private String remark;
  /**
   * 费用承担方(0:服务商承担 1:客户承担)
   */
  @Column(name = "EXPENSE_RESPONSIBLE", columnDefinition = "smallint COMMENT '费用承担方(0:服务商承担 1:客户承担)'")
  private Short expenseResponsible;
  /**
   * 纳入总额(0:不纳入总额 1:纳入总额)
   */
  @Column(name = "INCLUDE_TOTAL_AMOUNT", columnDefinition = "smallint COMMENT ' 纳入总额(0:不纳入总额 1:纳入总额)'")
  private Short includeTotalAmount;
}
